package com.wingscode.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wingscode.common.validator.group.AddGroup;
import com.wingscode.common.validator.group.UpdateGroup;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 报价
 *
 * @author yan
 */
@Data
@TableName("offer_price")
public class OfferPriceEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	@TableId
	private Integer Id;

	/**
	 * 名称
	 */
	@NotNull(message="inquiryId不能为空", groups = {AddGroup.class, UpdateGroup.class})
	@TableField("inquiry_id")
	private Integer inquiryId;

	/**
	 * 合作价
	 */
	@TableField("cooperation_price")
	private BigDecimal cooperationPrice;

	/**
	 * 组卷价
	 */
	@TableField("test_paper_price")
	private BigDecimal testPaperPrice;

	/**
	 * 办理时长
	 */
	@TableField("deal_time")
	private String dealTime;

	/**
	 * 安许价
	 */
	@TableField("qual_price")
	private BigDecimal qualPrice;

	/**
	 * 安许时长
	 */
	@TableField("qual_time")
	private String qualTime;

	/**
	 * 裸资质价
	 */
	@TableField("zero_qual_price")
	private BigDecimal zeroQualPrice;

	/**
	 * 过件价
	 */
	@TableField("pass_price")
	private BigDecimal passPrice;

	/**
	 * 证书价
	 */
	@TableField("certificate_price")
	private BigDecimal certificatePrice;

	/**
	 * 合计费用
	 */
	@TableField("total_price")
	private BigDecimal totalPrice;

	/**
	 * 合计时长
	 */
	@TableField("total_time")
	private String totalTime;

	/**
	 * 创建时间
	 */
	@TableField("create_time")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
	private Date createTime;

	@TableField("update_time")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
	private Date updateTime;

	/**
	 * 用户id
	 */
	@TableField("user_id")
	private Integer userId;

	/**
	 * 企业id
	 */
	@TableField("agent_id")
	private Integer agentId;

	/**
	 * 状态 0-已报价 1-沟通中 2-已选择 3-已失效
	 */
	private Integer state;

	/**
	 * 备注
	 */
	private String remark;

	/**
	 * 用户姓名
	 */
	@TableField(exist = false)
	private String username;

	/**
	 * 头像
	 */
	@TableField(exist = false)
	private String avatar;
}
